﻿////////////////////////////////////////////////////////////////////////
//Autor: Gabriel Tame Borao  - gabrieltame@yahoo.es 
//Fecha: 2010/09/15 01:26
//Solucion: GTameReport.sln
//Proyecto: GTameReport
//Fichero: ChartType.cs
//
//	Copyright (C) 2010  Gabriel Tame Borao (GTB)
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program.  If not, see <http://www.gnu.org/licenses/>.
////////////////////////////////////////////////////////////////////////
namespace GTameReport
{
    using Rdl;
    using System;
    using System.Collections;

    public class ChartType
    {
        private GTameReport.ActionType _Action;
        private string _Bookmark;
        private GTameReport.CategoryAxisType _CategoryAxis;
        private GTameReport.CategoryGroupingsType _CategoryGroupings;
        private GTameReport.ChartDataType _ChartData;
        private ChartTypeChartElementOutput _ChartElementOutput;
        private GTameReport.CustomPropertiesType _CustomProperties;
        private string _DataElementName;
        private ChartTypeDataElementOutput _DataElementOutput;
        private string _DataSetName;
        private GTameReport.FiltersType _Filters;
        private string _Height;
        private bool? _KeepTogether = null;
        private string _Label;
        private string _Left;
        private GTameReport.LegendType _Legend;
        private string _LinkToChild;
        private string _NoRows;
        private bool? _PageBreakAtEnd = null;
        private bool? _PageBreakAtStart = null;
        private ChartTypePalette _Palette;
        private GTameReport.PlotAreaType _PlotArea;
        private uint? _PointWidth = null;
        private GTameReport.SeriesGroupingsType _SeriesGroupings;
        private GTameReport.StyleType _Style;
        private ChartTypeSubtype _Subtype;
        private GTameReport.ThreeDPropertiesType _ThreeDProperties;
        private GTameReport.TitleType _Title;
        private string _ToolTip;
        private string _Top;
        private ChartTypeType _Type;
        private GTameReport.ValueAxisType _ValueAxis;
        private GTameReport.VisibilityType _Visibility;
        private string _Width;
        private uint? _ZIndex = null;
        private string nameField;

        public Rdl.ChartType Write()
        {
            Rdl.ChartType type = new Rdl.ChartType();
            ArrayList list = new ArrayList();
            ArrayList list2 = new ArrayList();
            type.Name = this.nameField;
            if (this._Action != null)
            {
                list.Add(this._Action.Write());
                list2.Add(ItemsChoiceType27.Action);
            }
            if (this._Bookmark != null)
            {
                list.Add(this._Bookmark);
                list2.Add(ItemsChoiceType27.Bookmark);
            }
            if (this._CategoryAxis != null)
            {
                list.Add(this._CategoryAxis.Write());
                list2.Add(ItemsChoiceType27.CategoryAxis);
            }
            if (this._CategoryGroupings != null)
            {
                list.Add(this._CategoryGroupings.Write());
                list2.Add(ItemsChoiceType27.CategoryGroupings);
            }
            if (this._ChartData != null)
            {
                list.Add(this._ChartData.Write());
                list2.Add(ItemsChoiceType27.ChartData);
            }
            list.Add(this._ChartElementOutput);
            list2.Add(ItemsChoiceType27.ChartElementOutput);
            if (this._CustomProperties != null)
            {
                list.Add(this._CustomProperties.Write());
                list2.Add(ItemsChoiceType27.CustomProperties);
            }
            if (this._DataElementName != null)
            {
                list.Add(this._DataElementName);
                list2.Add(ItemsChoiceType27.DataElementName);
            }
            list.Add(this._DataElementOutput);
            list2.Add(ItemsChoiceType27.DataElementOutput);
            if (this._DataSetName != null)
            {
                list.Add(this._DataSetName);
                list2.Add(ItemsChoiceType27.DataSetName);
            }
            if (this._Filters != null)
            {
                list.Add(this._Filters.Write());
                list2.Add(ItemsChoiceType27.Filters);
            }
            if (this._Height != null)
            {
                list.Add(this._Height);
                list2.Add(ItemsChoiceType27.Height);
            }
            if (this._KeepTogether.HasValue)
            {
                list.Add(this._KeepTogether);
                list2.Add(ItemsChoiceType27.KeepTogether);
            }
            if (this._Label != null)
            {
                list.Add(this._Label);
                list2.Add(ItemsChoiceType27.Label);
            }
            if (this._Left != null)
            {
                list.Add(this._Left);
                list2.Add(ItemsChoiceType27.Left);
            }
            if (this._Legend != null)
            {
                list.Add(this._Legend.Write());
                list2.Add(ItemsChoiceType27.Legend);
            }
            if (this._LinkToChild != null)
            {
                list.Add(this._LinkToChild);
                list2.Add(ItemsChoiceType27.LinkToChild);
            }
            if (this._NoRows != null)
            {
                list.Add(this._NoRows);
                list2.Add(ItemsChoiceType27.NoRows);
            }
            if (this._PageBreakAtEnd.HasValue)
            {
                list.Add(this._PageBreakAtEnd);
                list2.Add(ItemsChoiceType27.PageBreakAtEnd);
            }
            if (this._PageBreakAtStart.HasValue)
            {
                list.Add(this._PageBreakAtStart);
                list2.Add(ItemsChoiceType27.PageBreakAtStart);
            }
            list.Add(this._Palette);
            list2.Add(ItemsChoiceType27.Palette);
            if (this._PlotArea != null)
            {
                list.Add(this._PlotArea.Write());
                list2.Add(ItemsChoiceType27.PlotArea);
            }
            if (this._PointWidth.HasValue)
            {
                list.Add(this._PointWidth);
                list2.Add(ItemsChoiceType27.PointWidth);
            }
            if (this._SeriesGroupings != null)
            {
                list.Add(this._SeriesGroupings.Write());
                list2.Add(ItemsChoiceType27.SeriesGroupings);
            }
            if (this._Style != null)
            {
                list.Add(this._Style.Write());
                list2.Add(ItemsChoiceType27.Style);
            }
            list.Add(this._Subtype);
            list2.Add(ItemsChoiceType27.Subtype);
            if (this._ThreeDProperties != null)
            {
                list.Add(this._ThreeDProperties.Write());
                list2.Add(ItemsChoiceType27.ThreeDProperties);
            }
            if (this._Title != null)
            {
                list.Add(this._Title.Write());
                list2.Add(ItemsChoiceType27.Title);
            }
            if (this._ToolTip != null)
            {
                list.Add(this._ToolTip);
                list2.Add(ItemsChoiceType27.ToolTip);
            }
            if (this._Top != null)
            {
                list.Add(this._Top);
                list2.Add(ItemsChoiceType27.Top);
            }
            list.Add(this._Type);
            list2.Add(ItemsChoiceType27.Type);
            if (this._ValueAxis != null)
            {
                list.Add(this._ValueAxis.Write());
                list2.Add(ItemsChoiceType27.ValueAxis);
            }
            if (this._Visibility != null)
            {
                list.Add(this._Visibility.Write());
                list2.Add(ItemsChoiceType27.Visibility);
            }
            if (this._Width != null)
            {
                list.Add(this._Width);
                list2.Add(ItemsChoiceType27.Width);
            }
            if (this._ZIndex.HasValue)
            {
                list.Add(this._ZIndex);
                list2.Add(ItemsChoiceType27.ZIndex);
            }
            type.Items = list.ToArray();
            type.ItemsElementName = (ItemsChoiceType27[]) list2.ToArray(typeof(ItemsChoiceType27));
            list2 = null;
            list = null;
            return type;
        }

        public GTameReport.ActionType Action
        {
            get
            {
                if (this._Action == null)
                {
                    this._Action = new GTameReport.ActionType();
                }
                return this._Action;
            }
            set
            {
                this._Action = value;
            }
        }

        public string Bookmark
        {
            get
            {
                return this._Bookmark;
            }
            set
            {
                this._Bookmark = value;
            }
        }

        public GTameReport.CategoryAxisType CategoryAxis
        {
            get
            {
                if (this._CategoryAxis == null)
                {
                    this._CategoryAxis = new GTameReport.CategoryAxisType();
                }
                return this._CategoryAxis;
            }
            set
            {
                this._CategoryAxis = value;
            }
        }

        public GTameReport.CategoryGroupingsType CategoryGroupings
        {
            get
            {
                if (this._CategoryGroupings == null)
                {
                    this._CategoryGroupings = new GTameReport.CategoryGroupingsType();
                }
                return this._CategoryGroupings;
            }
            set
            {
                this._CategoryGroupings = value;
            }
        }

        public GTameReport.ChartDataType ChartData
        {
            get
            {
                if (this._ChartData == null)
                {
                    this._ChartData = new GTameReport.ChartDataType();
                }
                return this._ChartData;
            }
            set
            {
                this._ChartData = value;
            }
        }

        public ChartTypeChartElementOutput ChartElementOutput
        {
            get
            {
                return this._ChartElementOutput;
            }
            set
            {
                this._ChartElementOutput = value;
            }
        }

        public GTameReport.CustomPropertiesType CustomProperties
        {
            get
            {
                if (this._CustomProperties == null)
                {
                    this._CustomProperties = new GTameReport.CustomPropertiesType();
                }
                return this._CustomProperties;
            }
            set
            {
                this._CustomProperties = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return this._DataElementName;
            }
            set
            {
                this._DataElementName = value;
            }
        }

        public ChartTypeDataElementOutput DataElementOutput
        {
            get
            {
                return this._DataElementOutput;
            }
            set
            {
                this._DataElementOutput = value;
            }
        }

        public string DataSetName
        {
            get
            {
                return this._DataSetName;
            }
            set
            {
                this._DataSetName = value;
            }
        }

        public GTameReport.FiltersType Filters
        {
            get
            {
                if (this._Filters == null)
                {
                    this._Filters = new GTameReport.FiltersType();
                }
                return this._Filters;
            }
            set
            {
                this._Filters = value;
            }
        }

        public string Height
        {
            get
            {
                return this._Height;
            }
            set
            {
                this._Height = value;
            }
        }

        public bool? KeepTogether
        {
            get
            {
                return this._KeepTogether;
            }
            set
            {
                this._KeepTogether = value;
            }
        }

        public string Label
        {
            get
            {
                return this._Label;
            }
            set
            {
                this._Label = value;
            }
        }

        public string Left
        {
            get
            {
                return this._Left;
            }
            set
            {
                this._Left = value;
            }
        }

        public GTameReport.LegendType Legend
        {
            get
            {
                if (this._Legend == null)
                {
                    this._Legend = new GTameReport.LegendType();
                }
                return this._Legend;
            }
            set
            {
                this._Legend = value;
            }
        }

        public string LinkToChild
        {
            get
            {
                return this._LinkToChild;
            }
            set
            {
                this._LinkToChild = value;
            }
        }

        public string Name
        {
            get
            {
                return this.nameField;
            }
            set
            {
                this.nameField = value;
            }
        }

        public string NoRows
        {
            get
            {
                return this._NoRows;
            }
            set
            {
                this._NoRows = value;
            }
        }

        public bool? PageBreakAtEnd
        {
            get
            {
                return this._PageBreakAtEnd;
            }
            set
            {
                this._PageBreakAtEnd = value;
            }
        }

        public bool? PageBreakAtStart
        {
            get
            {
                return this._PageBreakAtStart;
            }
            set
            {
                this._PageBreakAtStart = value;
            }
        }

        public ChartTypePalette Palette
        {
            get
            {
                return this._Palette;
            }
            set
            {
                this._Palette = value;
            }
        }

        public GTameReport.PlotAreaType PlotArea
        {
            get
            {
                if (this._PlotArea == null)
                {
                    this._PlotArea = new GTameReport.PlotAreaType();
                }
                return this._PlotArea;
            }
            set
            {
                this._PlotArea = value;
            }
        }

        public uint? PointWidth
        {
            get
            {
                return this._PointWidth;
            }
            set
            {
                this._PointWidth = value;
            }
        }

        public GTameReport.SeriesGroupingsType SeriesGroupings
        {
            get
            {
                if (this._SeriesGroupings == null)
                {
                    this._SeriesGroupings = new GTameReport.SeriesGroupingsType();
                }
                return this._SeriesGroupings;
            }
            set
            {
                this._SeriesGroupings = value;
            }
        }

        public GTameReport.StyleType Style
        {
            get
            {
                if (this._Style == null)
                {
                    this._Style = new GTameReport.StyleType();
                }
                return this._Style;
            }
            set
            {
                this._Style = value;
            }
        }

        public ChartTypeSubtype Subtype
        {
            get
            {
                return this._Subtype;
            }
            set
            {
                this._Subtype = value;
            }
        }

        public GTameReport.ThreeDPropertiesType ThreeDProperties
        {
            get
            {
                if (this._ThreeDProperties == null)
                {
                    this._ThreeDProperties = new GTameReport.ThreeDPropertiesType();
                }
                return this._ThreeDProperties;
            }
            set
            {
                this._ThreeDProperties = value;
            }
        }

        public GTameReport.TitleType Title
        {
            get
            {
                if (this._Title == null)
                {
                    this._Title = new GTameReport.TitleType();
                }
                return this._Title;
            }
            set
            {
                this._Title = value;
            }
        }

        public string ToolTip
        {
            get
            {
                return this._ToolTip;
            }
            set
            {
                this._ToolTip = value;
            }
        }

        public string Top
        {
            get
            {
                return this._Top;
            }
            set
            {
                this._Top = value;
            }
        }

        public ChartTypeType Type
        {
            get
            {
                return this._Type;
            }
            set
            {
                this._Type = value;
            }
        }

        public GTameReport.ValueAxisType ValueAxis
        {
            get
            {
                if (this._ValueAxis == null)
                {
                    this._ValueAxis = new GTameReport.ValueAxisType();
                }
                return this._ValueAxis;
            }
            set
            {
                this._ValueAxis = value;
            }
        }

        public GTameReport.VisibilityType Visibility
        {
            get
            {
                if (this._Visibility == null)
                {
                    this._Visibility = new GTameReport.VisibilityType();
                }
                return this._Visibility;
            }
            set
            {
                this._Visibility = value;
            }
        }

        public string Width
        {
            get
            {
                return this._Width;
            }
            set
            {
                this._Width = value;
            }
        }

        public uint? ZIndex
        {
            get
            {
                return this._ZIndex;
            }
            set
            {
                this._ZIndex = value;
            }
        }
    }
}

